home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk116 / magman / magman.doc < prev    next >
Text File  |  1995-03-19  |  10KB  |  211 lines

  1. MAGMAN.DOC
  2.  
  3.     MagMan is a Magazine Article Manager.
  4.     
  5.     MagMan Version 2.02 was written March 1990
  6.     by Mike Budahn, Virginia Beach, VA
  7.     for the Commodore Amiga computer.
  8.  
  9.     This program was originally called MAGGREP, since it grew out of my
  10. experimentation with the GREP utility.  I've change the name for purely
  11. aesthetic reasons.  MAGMAN is Copyright 1990 by Mike Budahn.
  12.  
  13.     This archive file contains:
  14.     
  15.     MAGMAN.DOC     - this documentation file
  16.     MAGMAN.PW      - Power Windows(tm) file (not up-to-date)
  17.     MANMAN.C       - source file
  18.     MAGMAN.H       - header file
  19.     MAGMAN         - executable file
  20.     Database       - a sample database
  21.     MAGMAN.info    - icon to start MAGMAN from WorkBench
  22.     
  23.     Database.info  - icon for the database
  24.     MAGMAN.DOC.info- icon for the documentation file
  25.     
  26.     By setting the default tool of the Database.info and Doc.info icons
  27.     to the location of your text reader, you can view the documentation
  28.     or your database simply byclicking on these icons.
  29.     
  30. MAGMAN is being placed in the public domain via the Nexus and Lattice
  31. Bulletin Board services.  This program may be freely used provided no
  32. subsequent versions are released without the expressed, written consent
  33. of the author.  MagMan may be freely distributed provided the executable,
  34. source, and documentation files remain intact together.
  35.  
  36. Under no circumstances may anyone monitarily profit from this program.
  37. MagMan is free.
  38.  
  39. MagMan is being offered to the Amiga community for the utilitarian purpose
  40. it serves, and also as a tutorial for those seeking to learn more about
  41. the Amiga computer or C programming language.
  42.  
  43. Neither the author nor the Bulletin Board services may be held liable for
  44. any errors in programming or statement, and the user is solely responsible
  45. for damages which may be incurred by using this program.  The author is
  46. not obligated to add to, enhance, or correct this program.
  47.  
  48. Use of this program for the purpose of transporting any foreign code,
  49. including but not limited to viruses, trojans, or any other functions not
  50. in keeping with the intent of this program, damages the reputation of the
  51. author, Commodore, the Bulletin Board services, and the computer industry
  52. in general.  Any person or persons using this program for such purposes
  53. will be held liable by the author and any other party or parties who may
  54. seek litigation.
  55.  
  56.     I buy every Amiga magazine I can find, and after spending countless
  57. hours flipping through them to find some programming technique that would
  58. solve a problem, or some review about a product I wanted to buy, I decided
  59. I needed something to help me find topics quickly.  Rather than buy a
  60. database program, which would do the same thing, I took this need as a
  61. good excuse to write a C program.
  62.  
  63.     I've been learning C for several years.  I've read the learning curve
  64. for C on the Amiga is steep, and it is, but it's not that hard.  My
  65. difficulty has been finding program examples.  So many magazines are
  66. oriented toward reviews.  The best source of code I've found are the
  67. public domain files on BBS's.
  68.  
  69.     So here's mine, as it is.  I hope MagMan solves a problem for you,
  70. either organizing your articles or furthering your programming skills.
  71. I'd just like to say thanks to Commodore for building my dream machine,
  72. to Lattice for excellent support, to Nexus for all the sharing, and
  73. especially to those programmers who've unselfishly offered their code
  74. to all.
  75.  
  76. ***********************************************************************
  77.  
  78.     INSTALLATION:
  79.  
  80.     MagMan assumes it will find a file called DATABASE on a volume called
  81. MAG:.  In my setup (a two disk system), I simply formatted a floppy disk,
  82. labeled it MAG, and placed MAGMAN on it.  Then to start the program I just
  83. type RUN MAG:MAGMAN.  If the DATABASE file is not found, MAGMAN makes it.
  84. Obviously, if you try to search a DATABASE file that doesn't exist, you'll
  85. get an error message.
  86.  
  87.     You hard disk users probably know what to do already.  You can place
  88. MAGMAN anywhere, and assign MAG to wherever it is.  You've got aliases
  89. and script files to play with.  The important point is to have the program
  90. and database together on a real or assigned volume called MAG.
  91.  
  92.     INNERDS:
  93.  
  94.     MagMan opens its own window, which contains 3 menu selections (with
  95. alternate command keys), 3 data entry gadgets, and 1 search gadget.
  96.  
  97.     The Add Item and Find Item menu selections serve to activate the
  98. Magazine Title or Keyword Search gadgets, placing the cursor there for
  99. you so you don't have to click the mouse.  Once a gadget is activated,
  100. it remains activated until the ENTER key is pressed on the keyboard or a
  101. mouse button is clicked.  This means that if you are in data entry mode,
  102. you cannot switch directly to search mode from the keyboard.  Although
  103. MagMan will appear to set up the proper mode, your next keypress will still
  104. occur in the gadget you were last in.
  105.  
  106.     There are three ways to handle this.  If you are in data entry mode
  107. and want to switch to search mode, you can merely press ENTER until you get
  108. past the Keywords gadget.  No gadgets are activated after the Keywords
  109. gadget is passed.  Then AMIGA-F will set up properly.  If you are in search
  110. mode and want to switch to data entry mode, just press ENTER when the find
  111. gadget is empty.  No search will occur, no gadgets will be active, and key
  112. commands will work again.
  113.     Second, you can just click in the appropriate gadget.  MagMan figures
  114. the mode you're in by the status of text in the various gadgets.  It will
  115. not search if search text is unspecified, and it will not save if any data
  116. gadgets are empty.
  117.     Third, you can select your mode from the menu.  The right mouse button
  118. deactivates gadgets, and sets all modes properly.
  119.  
  120.     ADDING ITEMS:
  121.  
  122.     Hold down the right Amiga key and press A (for Add An Item).  All
  123. gadgets will clear, and your cursor will be placed in the Title gadget.
  124. Type the magazine title, and press ENTER.  Your cursor will move to the
  125. Issue gadget.  Type in the issue, and press ENTER.  Your cursor will move
  126. to the Keywords gadget.
  127.  
  128. NOTE: The Title and Issue gadgets are as wide as they appear on the screen.
  129. The Keywords gadget is wider than it appears.  You can type over 200
  130. characters in the gadget.  I've found that to be enough for my purposes.
  131. If it's not enough for yours, you can always make multiple magazine
  132. entries.  In other words, there's no harm having the same magazine or
  133. issue twice.
  134.  
  135. VERY IMPORTANT: The Find function assumes your keywords or phrases are
  136. separated by commas.  It further assumes that a space follows a comma.
  137. I've done it this way because, here in America, we always follow commas
  138. with a space.  So as you enter keywords/phrases, type:
  139.  
  140.     FIRST KEYWORD, NEXT KEYWORD, FINAL KEYWORD(enter)
  141.  
  142.     After you type the keywords and press enter, your cursor goes away.
  143. Normally at this point, you'll hold down the right Amiga key and press S
  144. (for SAVE THIS ITEM).  Your data will be appended to the DATABASE file.
  145. If you make an error in any previous gadget, just click in the gadget
  146. and edit the error.
  147.  
  148.     Repeat the process for the next data item... select AMIGA-A, enter the
  149. title, enter the issue, enter the keywords (separated by a comma and a
  150. space), then AMIGA-S to save, then repeat.
  151.  
  152.     Your data is saved as ASCII in the file, so even in the worst case
  153. scenario, you can easily edit the data with a text processor.
  154.  
  155.     It is also recommened that you make no single keyword entry longer
  156. than the keyword gadget.  Although you can type in over 200 characters in
  157. the keyword gadget, the function that displays the results of your search
  158. allows no scrolling through the gadget.  So if your phrase is longer than
  159. the keyword gadget, you won't be able to see it all.
  160.  
  161.     SEARCHING:
  162.  
  163.     To find something, simply click your mouse in the Find gadget, type
  164. in the text to search for, and press ENTER.  Immediately MagMan will first
  165. verify that you did in fact type something in the gadget, then it will
  166. begin the search.  If a match is found, the data will be displayed in the
  167. window, and the program will wait for a key press (a "vanilla key.")  Some
  168. keys are not legitimate, but any character key or the ENTER key will
  169. work.  If you find the item you want, and wish to discontinue searching,
  170. just press the ESCape key in the upper left corner of your keyboard.
  171.     Version 2.01 added a Find menu selection, recognizing the alternate
  172. key command RIGHT AMIGA-F.
  173.  
  174.     EXITING:
  175.  
  176.     To quit the program, click the close window gadget.
  177.  
  178.     VER.2.1 LESSON...
  179.     
  180.     I work almost exclusively in the CLI, so it was some weeks before
  181. I realized that MAGMAN opened an ugly console window on the WorkBench.
  182. Lattice allows us to remove that window, so long as the program handles
  183. all output.  Typical Amiga C code has you opening libraries like:
  184.  
  185.     if (!(IntuitionBase=OpenLibrary("intuition.library",0))) {
  186.         printf("can't open intuition") ;
  187.         closeall() ;
  188.     }
  189.     
  190.     That printf function is one that must be done through a console.  If
  191. you run the program from the CLI, there's no problem -- the CLI IS your
  192. output console.  For WorkBench, that won't do.
  193.  
  194.     For this version, I simply removed the printf's, all of which occurred
  195. during startup, so, if Intuition can't be found, etc., the program simply
  196. exits.  This shouldn't be a problem for any setups.  The exception is if
  197. you're low on RAM, and there's not enough room for MAGMAN's window.  Then
  198. the program will exit, and you may not realize why.
  199.  
  200.     Programming-wise, to remove the console window for WorkBench, simply
  201. change your function  VOID main()  to  VOID _main().  At the same time, be
  202. sure to change any function  exit()  to  _exit().
  203.  
  204.     VER.2.2 LESSON...
  205.     
  206.     When creating string gadgets, be careful the gadget accepts no more
  207. characters than you have buffer for.  I had goofed by specifying a keyword
  208. buffer of 216 characters, but the gadget could take in 255.  Consequently,
  209. the 217th character would spill into some other memory area.  This is a
  210. novice mistake; not the first for me.
  211.